package com.kuang.mapper;

import com.kuang.pojo.User;
import org.mybatis.spring.SqlSessionTemplate;
import org.mybatis.spring.support.SqlSessionDaoSupport;

import java.util.List;

public class UserMapperImpl extends SqlSessionDaoSupport implements UserMapper {
    //我们的所有操作 都是用sqlsession来执行，原来  现在使用sqlsessiontemplate

    //private SqlSessionTemplate sqlsession;

    public List<User> selectUser() {
        UserMapper mapper = getSqlSession().getMapper(UserMapper.class);
        return mapper.selectUser();
    }


//    //public void setSqlsession(SqlSessionTemplate sqlsession) {
//        this.sqlsession = sqlsession;
//    }
}
